package com.hhj.sell.utils;

import com.hhj.sell.vo.ResultVo;

public class ResultVoUtil {
    public static ResultVo seccess(Object object) {
        ResultVo<Object> resultVo = new ResultVo<>();
        resultVo.setCode(0);
        resultVo.setMsg("成功");
        resultVo.setData(object);
        return resultVo;
    }
    public static ResultVo seccess() {
        return seccess(null);
    }
    public static ResultVo error(Integer code,String msg) {
        ResultVo<Object> resultVo = new ResultVo<>();
        resultVo.setCode(code);
        resultVo.setMsg(msg);
        return resultVo;
    }
}
